package server.database;

import java.sql.Connection;
import java.sql.DriverManager;

/**
 * 
 * @author Bell
 * 
 */
public class DbConnectionCreator {
	public static Connection conn;

	public static Connection getConnection() {
		if (conn == null) {
			try {
				Class.forName("com.mysql.jdbc.Driver");
				DbConnectionCreator.conn = DriverManager.getConnection(
						"jdbc:mysql://115.27.61.34:3306/renrenBase", "renren", "12345");

			} catch (Exception e) {
				System.out.println("cannot connect to database");
			}
		}
		return conn;
	}

}
